/**
 * WHATSAPP CHAT WIDGET STYLES
 * Estilos para o widget de chat do WhatsApp
 */

/* Estilo do botão de WhatsApp - Melhorado */
.whatsapp-float {
    position: fixed;
    width: 64px;
    height: 64px;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #128c7e, #25d366);
}

.whatsapp-float i {
    font-size: 32px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.whatsapp-svg {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Animação Lottie WhatsApp - Efeito Burst */
.whatsapp-lottie {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    display: none; /* Escondido por padrão */
}

.whatsapp-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 32px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: block; /* Visível por padrão */
}

.whatsapp-svg {
    display: none; /* Escondido por padrão */
}

/* Mini Chat Container */
.mini-chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    height: 520px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.mini-chat-container.show {
    display: flex;
    animation: slideUp 0.3s ease;
}

/* Chat Header */
.chat-header {
    background: #075e54;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px 10px 0 0;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: #128c7e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.chat-info {
    flex: 1;
}

.chat-info h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.online-status {
    font-size: 12px;
    opacity: 0.9;
    color: #dcf8c6;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-chat:hover {
    background: rgba(255,255,255,0.1);
}

/* Chat Messages - Estilo WhatsApp */
.chat-messages {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    background: #e5ddd5;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.message {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.bot-message {
    align-items: flex-start;
}

.bot-message .message-content {
    background: #ffffff;
    color: #303030;
    padding: 8px 12px;
    border-radius: 7.5px 7.5px 7.5px 0;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.3;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    position: relative;
}

.user-message {
    align-items: flex-end;
}

.user-message .message-content {
    background: #dcf8c6;
    color: #303030;
    padding: 8px 12px;
    border-radius: 7.5px 7.5px 0 7.5px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.3;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    position: relative;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    text-align: right;
    padding-right: 8px;
}

.bot-message .message-time {
    text-align: left;
    padding-left: 8px;
    padding-right: 0;
}

/* Quick Options */
.quick-options {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.quick-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    margin: 3px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: #25d366;
    color: white;
}

/* Chat Input - Estilo WhatsApp */
.chat-input {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input input:focus {
    border-color: #25d366;
}

.chat-input button {
    background: #25d366;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: #128c7e;
}

/* Chat Footer - Botão WhatsApp */
.chat-footer {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.whatsapp-direct {
    width: 100%;
    background: #25d366;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-direct:hover {
    background: #128c7e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Animações */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .mini-chat-container {
        width: 320px;
        height: 480px;
        right: 10px;
        bottom: 80px;
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 15px;
        right: 15px;
        font-size: 28px;
    }
    
    .whatsapp-float i {
        font-size: 28px;
    }
    
    .whatsapp-svg {
        width: 28px;
        height: 28px;
    }
}

/* Indicador de digitando */
.typing-indicator {
    opacity: 0.8;
}

.typing-dots {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 10px;
}

.typing-dots span {
    position: absolute;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25d366;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    left: 0;
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    left: 12px;
    animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
    left: 24px;
    animation-delay: 0s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .mini-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        left: 10px;
        bottom: 80px;
    }
}








